<?php
require_once("vcl/vcl.inc.php");
require_once("lib/db_connection.php");
//Includes
use_unit("components4phpfull/jtexplanationpopup.inc.php");
use_unit("platinumgrid/jtplatinumgrid.inc.php");
use_unit("components4phpfull/jtdivwindow.inc.php");
use_unit("components4phpfull/jtjavascript.inc.php");
use_unit("components4phpfull/jtsitetheme.inc.php");
use_unit("components4phpfull/jtgroupbox.inc.php");
use_unit("forms.inc.php");
use_unit("extctrls.inc.php");
use_unit("stdctrls.inc.php");

//Class definition
class Mount_Dismount extends Page
{
       public $snrid11 = null;
       public $snrid9 = null;
       public $snrid7 = null;
       public $snrid5 = null;
       public $snrid3 = null;
       public $snrid1 = null;
       public $snrid12 = null;
       public $snrid10 = null;
       public $snrid8 = null;
       public $snrid6 = null;
       public $snrid4 = null;
       public $snrid2 = null;
       public $snid12 = null;
       public $snid10 = null;
       public $snid8 = null;
       public $snid6 = null;
       public $snid4 = null;
       public $snid2 = null;
       public $snid11 = null;
       public $snid9 = null;
       public $snid7 = null;
       public $snid5 = null;
       public $snid3 = null;
       public $snid1 = null;
       public $trid11 = null;
       public $trid9 = null;
       public $trid7 = null;
       public $trid5 = null;
       public $trid3 = null;
       public $trid1 = null;
       public $trid12 = null;
       public $trid10 = null;
       public $trid8 = null;
       public $trid6 = null;
       public $trid4 = null;
       public $trid2 = null;
       public $tid12 = null;
       public $tid10 = null;
       public $tid8 = null;
       public $tid6 = null;
       public $tid4 = null;
       public $tid2 = null;
       public $tid11 = null;
       public $tid9 = null;
       public $tid7 = null;
       public $tid5 = null;
       public $tid3 = null;
       public $tid1 = null;
       public $JTJavaScript4 = null;
       public $JTAvailableTires = null;
       public $JTGroupBox2 = null;
       public $Risblank11 = null;
       public $Risblank9 = null;
       public $Risblank7 = null;
       public $Risblank5 = null;
       public $Risblank3 = null;
       public $Risblank1 = null;
       public $Risblank12 = null;
       public $Risblank10 = null;
       public $Risblank8 = null;
       public $Risblank6 = null;
       public $Risblank4 = null;
       public $Risblank2 = null;
       public $Lisblank12 = null;
       public $Lisblank10 = null;
       public $Lisblank8 = null;
       public $Lisblank6 = null;
       public $Lisblank4 = null;
       public $Lisblank2 = null;
       public $Lisblank11 = null;
       public $Lisblank9 = null;
       public $Lisblank7 = null;
       public $Lisblank5 = null;
       public $Lisblank3 = null;
       public $Lisblank1 = null;
       public $remem = null;
       public $imgBack = null;
       public $JTJavaScript3 = null;
       public $tireseluid = null;
       public $axlewheel = null;
       public $JTJavaScript2 = null;
       public $tireselhid = null;
       public $Rhid12 = null;
       public $Rhid10 = null;
       public $Rhid8 = null;
       public $Rhid6 = null;
       public $Rhid4 = null;
       public $Rhid11 = null;
       public $Rhid9 = null;
       public $Rhid7 = null;
       public $Rhid5 = null;
       public $Rhid3 = null;
       public $Rhid1 = null;
       public $Rhid2 = null;
       public $Lhid12 = null;
       public $Lhid10 = null;
       public $Lhid8 = null;
       public $Lhid6 = null;
       public $Lhid4 = null;
       public $Lhid2 = null;
       public $Lhid11 = null;
       public $Lhid9 = null;
       public $Lhid7 = null;
       public $Lhid5 = null;
       public $Lhid3 = null;
       public $Lhid1 = null;
       public $JTJavaScript1 = null;
       public $JTSiteTheme1 = null;
       public $hiddenId = null;
       public $JTGroupBox1 = null;
       public $imgR12 = null;
       public $imgL12 = null;
       public $imgR10 = null;
       public $imgL10 = null;
       public $imgR8 = null;
       public $imgL8 = null;
       public $imgR6 = null;
       public $imgL6 = null;
       public $imgR4 = null;
       public $imgL4 = null;
       public $imgL1 = null;
       public $imgR1 = null;
       public $imgL11 = null;
       public $imgR11 = null;
       public $imgBar6 = null;
       public $imgL9 = null;
       public $imgR9 = null;
       public $imgBar5 = null;
       public $imgL7 = null;
       public $imgR7 = null;
       public $imgBar4 = null;
       public $imgL5 = null;
       public $imgR5 = null;
       public $imgL3 = null;
       public $imgR3 = null;
       public $imgL2 = null;
       public $imgR2 = null;
       public $imgBar3 = null;
       public $imgBar2 = null;
       public $imgBar1 = null;
       public $lblVIN = null;
       public $Label2 = null;
       public $Label1 = null;
       public $Image1 = null;
       function Mount_DismountJSLoad($sender, $params)
       {

       ?>
       //Add your javascript code here
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       <?php

       }


       function imgBackJSMouseOut($sender, $params)
       {

       ?>
       //Add your javascript code here
       document.images['imgBack'].src="image/btn_back.png"
       <?php

       }

       function imgBackJSMouseOver($sender, $params)
       {

       ?>
       //Add your javascript code here
       document.images['imgBack'].src="image/btn_back2.png"
       <?php

       }


       function JTAvailableTiresShow($sender, $params)
       {
       $query1 = "select * from tire_inventory_tbl where company_id='".$_SESSION['company_id']."' and status = 0";
       $result = mysql_query($query1)or die(mysql_error());


        $arr = array();
        while($row = mysql_fetch_array($result))
          {
            $tire_id = $row['tire_id'];
            $tire_sn = $row['tire_SN'];

            //$tire_sn = "<a href = '#' onClick = window.open('tire_journal_create.php?tire_id=".$tire_id."&tire_sn=".$tire_sn."&veh_tire_id=".$vehtiresel."','mywindow','left=256,top=590,width=800,height=600'); >".$row['tire_SN']."</a>";
             //$tire_sn = "<a href = 'tire_mount_dismount.php?veh=".$this->hiddenId->getValue()."' onClick = openWindow('".$tire_id."','".$tire_sn."'); >".$row['tire_SN']."</a>";
               $tire_sn = "<a href = '#' onClick = openWindow('".$tire_id."','".$tire_sn."'); >".$row['tire_SN']."</a>";



            $arr[] = array(
                        'Tire ID' => $tire_sn,
                        'Brand' => $row['manufacturer'],
                        'Size' => $row['size'],
                        'Type' => $row['type'],
                        'Date Purchased' => $row['purch_date'],
                        );


          }

            $this->JTAvailableTires->setCellData($arr);


       }

       function imgR11JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgR11');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'R11';
       document.getElementById("tireseluid").value = document.getElementById("Rhid11").value;
       document.getElementById('axlewheel').value = '6 - Ro';
       if(document.getElementById("Risblank11").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("trid11").value,document.getElementById("snrid11").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }

       function imgR12JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgR12');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'R12';
       document.getElementById("tireseluid").value = document.getElementById("Rhid12").value;
       document.getElementById('axlewheel').value = '6 - Ri';
       if(document.getElementById("Risblank12").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("trid12").value,document.getElementById("snrid12").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }

       function imgR9JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgR9');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'R9';
       document.getElementById("tireseluid").value = document.getElementById("Rhid9").value;
       document.getElementById('axlewheel').value = '5 - Ro';
       if(document.getElementById("Risblank9").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("trid9").value,document.getElementById("snrid9").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }

       function imgR10JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgR10');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'R10';
       document.getElementById("tireseluid").value = document.getElementById("Rhid10").value;
       document.getElementById('axlewheel').value = '5 - Ri';
       if(document.getElementById("Risblank10").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("trid10").value,document.getElementById("snrid10").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }

       function imgR7JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgR7');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'R7';
       document.getElementById("tireseluid").value = document.getElementById("Rhid7").value;
       document.getElementById('axlewheel').value = '4 - Ro';
       if(document.getElementById("Risblank7").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("trid7").value,document.getElementById("snrid7").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }

       function imgR72JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgR7');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'R7';
       document.getElementById("tireseluid").value = document.getElementById("Rhid7").value;
       document.getElementById('axlewheel').value = '4 - Ro';
       if(document.getElementById("Risblank72").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("trid72").value,document.getElementById("snrid72").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }

       function imgR8JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgR8');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'R8';
       document.getElementById("tireseluid").value = document.getElementById("Rhid8").value;
       document.getElementById('axlewheel').value = '4 - Ri';
       if(document.getElementById("Risblank8").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("trid8").value,document.getElementById("snrid8").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }

       function imgR5JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgR5');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'R5';
       document.getElementById("tireseluid").value = document.getElementById("Rhid5").value;
       document.getElementById('axlewheel').value = '3 - Ro';
       if(document.getElementById("Risblank5").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("trid5").value,document.getElementById("snrid5").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }

       function imgR6JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgR6');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'R6';
       document.getElementById("tireseluid").value = document.getElementById("Rhid6").value;
       document.getElementById('axlewheel').value = '3 - Ri';
       if(document.getElementById("Risblank6").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("trid6").value,document.getElementById("snrid6").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }


       function imgR3JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgR3');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'R3';
       document.getElementById("tireseluid").value = document.getElementById("Rhid3").value;
       document.getElementById('axlewheel').value = '2 - Ro';
       if(document.getElementById("Risblank3").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("trid3").value,document.getElementById("snrid3").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }

       function imgR4JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgR4');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'R4';
       document.getElementById("tireseluid").value = document.getElementById("Rhid4").value;
       document.getElementById('axlewheel').value = '2 - Ri';
       if(document.getElementById("Risblank4").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("trid4").value,document.getElementById("snrid4").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }


       function imgR1JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgR1');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'R1';
       document.getElementById("tireseluid").value = document.getElementById("Rhid1").value;
       document.getElementById('axlewheel').value = '1 - Ro';
       if(document.getElementById("Risblank1").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("trid1").value,document.getElementById("snrid1").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }

       function imgR2JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgR2');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'R2';
       document.getElementById("tireseluid").value = document.getElementById("Rhid2").value;
       document.getElementById('axlewheel').value = '1 - Ri';
       if(document.getElementById("Risblank2").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("trid2").value,document.getElementById("snrid2").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }

       function imgL12JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgL12');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'L12';
       document.getElementById("tireseluid").value = document.getElementById("Lhid12").value;
       document.getElementById('axlewheel').value = '6 - Li';
       if(document.getElementById("Lisblank12").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("tid12").value,document.getElementById("snid12").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }

       function imgL11JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgL11');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'L11';
       document.getElementById("tireseluid").value = document.getElementById("Lhid11").value;
       document.getElementById('axlewheel').value = '6 - Lo';
              if(document.getElementById("Lisblank11").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("tid11").value,document.getElementById("snid11").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }

       function imgL10JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgL10');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'L10';
       document.getElementById("tireseluid").value = document.getElementById("Lhid10").value;
       document.getElementById('axlewheel').value = '5 - Li';
              if(document.getElementById("Lisblank10").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("tid10").value,document.getElementById("snid10").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }

       function imgL9JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgL9');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'L9';
       document.getElementById("tireseluid").value = document.getElementById("Lhid9").value;
       document.getElementById('axlewheel').value = '5 - Lo';
       if(document.getElementById("Lisblank9").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("tid9").value,document.getElementById("snid9").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }

       function imgL8JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgL8');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'L8';
       document.getElementById("tireseluid").value = document.getElementById("Lhid8").value;
       document.getElementById('axlewheel').value = '4 - Li';
       if(document.getElementById("Lisblank8").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("tid8").value,document.getElementById("snid8").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }

       function imgL7JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgL7');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'L7';
       document.getElementById("tireseluid").value = document.getElementById("Lhid7").value;
       document.getElementById('axlewheel').value = '4 - Lo';
       if(document.getElementById("Lisblank7").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("tid7").value,document.getElementById("snid7").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }

       function imgL6JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgL6');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'L6';
       document.getElementById("tireseluid").value = document.getElementById("Lhid6").value;
       document.getElementById('axlewheel').value = '3 - Li';
       if(document.getElementById("Lisblank6").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("tid6").value,document.getElementById("snid6").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }

       function imgL5JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgL5');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'L5';
       document.getElementById("tireseluid").value = document.getElementById("Lhid5").value;
       document.getElementById('axlewheel').value = '3 - Lo';
       if(document.getElementById("Lisblank5").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("tid5").value,document.getElementById("snid5").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }

       function imgL4JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgL4');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'L4';
       document.getElementById("tireseluid").value = document.getElementById("Lhid4").value;
       document.getElementById('axlewheel').value = '2 - Li';
       if(document.getElementById("Lisblank4").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("tid4").value,document.getElementById("snid4").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }



       function imgL3JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgL3');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'L3';
       document.getElementById("tireseluid").value = document.getElementById("Lhid3").value;
       document.getElementById('axlewheel').value = '2 - Lo';
       if(document.getElementById("Lisblank3").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("tid3").value,document.getElementById("snid3").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }

       function imgL2JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgL2');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'L2';
       document.getElementById("tireseluid").value = document.getElementById("Lhid2").value;
       document.getElementById('axlewheel').value = '1 - Li';
       if(document.getElementById("Lisblank2").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("tid2").value,document.getElementById("snid2").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }

       function imgL1JSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       tireq('imgL1');
       //document.getElementById( "JTDivWindow1" ).Show();
       document.getElementById("tireselhid").value = 'L1';
       document.getElementById("tireseluid").value = document.getElementById("Lhid1").value;
       document.getElementById('axlewheel').value = '1 - Lo';
       if(document.getElementById("Lisblank1").value == '1')
       {
       document.getElementById('JTAvailableTires').style.visibility = 'hidden';
       document.getElementById('JTAvailableTires').style.display = 'none';
       var oki = confirm("Do you want to Dismount this tire?");
       if(oki)
       {
       openWindow2(document.getElementById("tid1").value,document.getElementById("snid1").value);
       }
       }
       else
       {
       document.getElementById('JTAvailableTires').style.visibility = 'visible';
       document.getElementById('JTAvailableTires').style.display = 'block';
       }
       <?php

       }





       function Mount_DismountCreate($sender, $params)
       {
       $_SESSION['company_id'];
       $this->axlewheel->Text = " - ";
       $id = $_GET['veh'];
       $this->hiddenId->setValue($id);

       $this->imgBack->setLink('vehicle_list.php?company='.$_SESSION['company_id']);

       $this->Lhid1->Value = "";
       $this->Lhid2->Value = "";
       $this->Lhid3->Value = "";
       $this->Lhid4->Value = "";
       $this->Lhid5->Value = "";
       $this->Lhid6->Value = "";
       $this->Lhid7->Value = "";
       $this->Lhid8->Value = "";
       $this->Lhid9->Value = "";
       $this->Lhid10->Value = "";
       $this->Lhid11->Value = "";
       $this->Lhid12->Value = "";
       $this->Rhid1->Value = "";
       $this->Rhid2->Value = "";
       $this->Rhid3->Value = "";
       $this->Rhid4->Value = "";
       $this->Rhid5->Value = "";
       $this->Rhid6->Value = "";
       $this->Rhid7->Value = "";
       $this->Rhid8->Value = "";
       $this->Rhid9->Value = "";
       $this->Rhid10->Value = "";
       $this->Rhid11->Value = "";
       $this->Rhid12->Value = "";

       $this->tid1->Value = "";
       $this->tid2->Value = "";
       $this->tid3->Value = "";
       $this->tid4->Value = "";
       $this->tid5->Value = "";
       $this->tid6->Value = "";
       $this->tid7->Value = "";
       $this->tid8->Value = "";
       $this->tid9->Value = "";
       $this->tid10->Value = "";
       $this->tid11->Value = "";
       $this->tid12->Value = "";
       $this->trid1->Value = "";
       $this->trid2->Value = "";
       $this->trid3->Value = "";
       $this->trid4->Value = "";
       $this->trid5->Value = "";
       $this->trid6->Value = "";
       $this->trid7->Value = "";
       $this->trid8->Value = "";
       $this->trid9->Value = "";
       $this->trid10->Value = "";
       $this->trid11->Value = "";
       $this->trid12->Value = "";

       $this->snid1->Value = "";
       $this->snid2->Value = "";
       $this->snid3->Value = "";
       $this->snid4->Value = "";
       $this->snid5->Value = "";
       $this->snid6->Value = "";
       $this->snid7->Value = "";
       $this->snid8->Value = "";
       $this->snid9->Value = "";
       $this->snid10->Value = "";
       $this->snid11->Value = "";
       $this->snid12->Value = "";
       $this->snrid1->Value = "";
       $this->snrid2->Value = "";
       $this->snrid3->Value = "";
       $this->snrid4->Value = "";
       $this->snrid5->Value = "";
       $this->snrid6->Value = "";
       $this->snrid7->Value = "";
       $this->snrid8->Value = "";
       $this->snrid9->Value = "";
       $this->snrid10->Value = "";
       $this->snrid11->Value = "";
       $this->snrid12->Value = "";

       $this->Lisblank1->Value = "0";
       $this->Lisblank2->Value = "0";
       $this->Lisblank3->Value = "0";
       $this->Lisblank4->Value = "0";
       $this->Lisblank5->Value = "0";
       $this->Lisblank6->Value = "0";
       $this->Lisblank7->Value = "0";
       $this->Lisblank8->Value = "0";
       $this->Lisblank9->Value = "0";
       $this->Lisblank10->Value = "0";
       $this->Lisblank11->Value = "0";
       $this->Lisblank12->Value = "0";
       $this->Risblank1->Value = "0";
       $this->Risblank2->Value = "0";
       $this->Risblank3->Value = "0";
       $this->Risblank4->Value = "0";
       $this->Risblank5->Value = "0";
       $this->Risblank6->Value = "0";
       $this->Risblank7->Value = "0";
       $this->Risblank8->Value = "0";
       $this->Risblank9->Value = "0";
       $this->Risblank10->Value = "0";
       $this->Risblank11->Value = "0";
       $this->Risblank12->Value = "0";

       $this->imgBar1->Hidden=true;
       $this->imgBar2->Hidden=true;
       $this->imgBar3->Hidden=true;
       $this->imgBar4->Hidden=true;
       $this->imgBar5->Hidden=true;
       $this->imgBar6->Hidden=true;

       $this->imgL1->Hidden=true;
       $this->imgL2->Hidden=true;
       $this->imgL3->Hidden=true;
       $this->imgL4->Hidden=true;
       $this->imgL5->Hidden=true;
       $this->imgL6->Hidden=true;
       $this->imgL7->Hidden=true;
       $this->imgL8->Hidden=true;
       $this->imgL9->Hidden=true;
       $this->imgL10->Hidden=true;
       $this->imgL11->Hidden=true;
       $this->imgL12->Hidden=true;

       $this->imgR1->Hidden=true;
       $this->imgR2->Hidden=true;
       $this->imgR3->Hidden=true;
       $this->imgR4->Hidden=true;
       $this->imgR5->Hidden=true;
       $this->imgR6->Hidden=true;
       $this->imgR7->Hidden=true;
       $this->imgR8->Hidden=true;
       $this->imgR9->Hidden=true;
       $this->imgR10->Hidden=true;
       $this->imgR11->Hidden=true;
       $this->imgR12->Hidden=true;

       $this->imgL1->Hint = "";
       $this->imgL2->Hint = "";
       $this->imgL3->Hint = "";
       $this->imgL4->Hint = "";
       $this->imgL5->Hint = "";
       $this->imgL6->Hint = "";
       $this->imgL7->Hint = "";
       $this->imgL8->Hint = "";
       $this->imgL9->Hint = "";
       $this->imgL10->Hint = "";
       $this->imgL11->Hint = "";
       $this->imgL12->Hint = "";

       $this->imgR1->Hint = "";
       $this->imgR2->Hint = "";
       $this->imgR3->Hint = "";
       $this->imgR4->Hint = "";
       $this->imgR5->Hint = "";
       $this->imgR6->Hint = "";
       $this->imgR7->Hint = "";
       $this->imgR8->Hint = "";
       $this->imgR9->Hint = "";
       $this->imgR10->Hint = "";
       $this->imgR11->Hint = "";
       $this->imgR12->Hint = "";

       $this->imgL1->ImageSource = 'image/old_tire.png';
       $this->imgL2->ImageSource = 'image/old_tire.png';
       $this->imgL3->ImageSource = 'image/old_tire.png';
       $this->imgL4->ImageSource = 'image/old_tire.png';
       $this->imgL5->ImageSource = 'image/old_tire.png';
       $this->imgL6->ImageSource = 'image/old_tire.png';
       $this->imgL7->ImageSource = 'image/old_tire.png';
       $this->imgL8->ImageSource = 'image/old_tire.png';
       $this->imgL9->ImageSource = 'image/old_tire.png';
       $this->imgL10->ImageSource = 'image/old_tire.png';
       $this->imgL11->ImageSource = 'image/old_tire.png';
       $this->imgL12->ImageSource = 'image/old_tire.png';

       $this->imgR1->ImageSource = 'image/old_tire.png';
       $this->imgR2->ImageSource = 'image/old_tire.png';
       $this->imgR3->ImageSource = 'image/old_tire.png';
       $this->imgR4->ImageSource = 'image/old_tire.png';
       $this->imgR5->ImageSource = 'image/old_tire.png';
       $this->imgR6->ImageSource = 'image/old_tire.png';
       $this->imgR7->ImageSource = 'image/old_tire.png';
       $this->imgR8->ImageSource = 'image/old_tire.png';
       $this->imgR9->ImageSource = 'image/old_tire.png';
       $this->imgR10->ImageSource = 'image/old_tire.png';
       $this->imgR11->ImageSource = 'image/old_tire.png';
       $this->imgR12->ImageSource = 'image/old_tire.png';

       /*
       $query = "select veh_tire.id as id,
                 veh_tire.t_type as t_type,
                 veh_tire.is_assigned as is_assigned,
                 veh_tire.vehicle_id as vehicle_id,
                 veh_tire.tire_id as tire_id,
                 tire_inventory_tbl.tire_SN as tire_SN from veh_tire join tire_inventory_tbl on veh_tire.tire_id=tire_inventory_tbl.tire_id where veh_tire.vehicle_id= '".$this->hiddenId->getValue()."'";
       */
       $query = "select * from veh_tire where vehicle_id= '".$this->hiddenId->getValue()."'";

       /*
       $query = "select * from veh_chassis_tbl where company_id= '".$_SESSION['company_id']."'
       AND vehicle_id= '".$this->hiddenId->getValue()."'";
       */
       $result_show = mysql_query($query) or die("SELECT JOURNAL - " . mysql_error());
       //$row= mysql_fetch_array($result_show);
       while($row = mysql_fetch_array($result_show))
       {
       if($row['t_type']=='L1')
       {
       if($row['is_assigned'] == 'yes')
       {
       $this->Lisblank1->Value = '1';
       $this->tid1->Value = $row['tire_id'];
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgL1->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snid1->Value = $rower['tire_SN'];
       }
       $this->imgL1->ImageSource = 'image/new_tire.png';
       }
       $this->imgBar1->Hidden=false;
       $this->imgL1->Hidden=false;
       $this->Lhid1->Value = $row['id'];
       $this->imgR1->Hidden=false;
       }
       if($row['t_type']=='R1')
       {
       if($row['is_assigned'] == 'yes')
       {
       $this->trid1->Value = $row['tire_id'];
       $this->Risblank1->Value = '1';
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgR1->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snrid1->Value = $rower['tire_SN'];
       }
       $this->imgR1->ImageSource = 'image/new_tire.png';
       }
       $this->Rhid1->Value = $row['id'];
       }
       if($row['t_type']=='L3')
       {
       if($row['is_assigned'] == 'yes')
       {
       $this->tid3->Value = $row['tire_id'];
       $this->Lisblank3->Value = '1';
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgL3->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snid3->Value = $rower['tire_SN'];
       }
       $this->imgL3->ImageSource = 'image/new_tire.png';
       }
       $this->imgBar2->Hidden=false;
       $this->imgL3->Hidden=false;
       $this->Lhid3->Value = $row['id'];
       $this->imgR3->Hidden=false;
       }
       if($row['t_type']=='R3')
       {
       if($row['is_assigned'] == 'yes')
       {
       $this->trid3->Value = $row['tire_id'];
       $this->Risblank3->Value = '1';
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgR3->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snrid3->Value = $rower['tire_SN'];
       }
       $this->imgR3->ImageSource = 'image/new_tire.png';
       }
       $this->Rhid3->Value = $row['id'];
       }
       if($row['t_type']=='L5')
       {
       if($row['is_assigned'] == 'yes')
       {
       $this->tid5->Value = $row['tire_id'];
       $this->Lisblank5->Value = '1';
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgL5->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snid5->Value = $rower['tire_SN'];
       }
       $this->imgL5->ImageSource = 'image/new_tire.png';
       }
       $this->imgBar3->Hidden=false;
       $this->imgL5->Hidden=false;
       $this->Lhid5->Value = $row['id'];
       $this->imgR5->Hidden=false;
       }
       if($row['t_type']=='R5')
       {
       if($row['is_assigned'] == 'yes')
       {
       $this->trid5->Value = $row['tire_id'];
       $this->Risblank5->Value = '1';
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgR5->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snrid5->Value = $rower['tire_SN'];
       }
       $this->imgR5->ImageSource = 'image/new_tire.png';
       }
       $this->Rhid5->Value = $row['id'];
       }
       if($row['t_type']=='L7')
       {
       if($row['is_assigned'] == 'yes')
       {
       $this->tid7->Value = $row['tire_id'];
       $this->Lisblank7->Value = '1';
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgL7->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snid7->Value = $rower['tire_SN'];
       }
       $this->imgL7->ImageSource = 'image/new_tire.png';
       }
       $this->imgBar4->Hidden=false;
       $this->imgL7->Hidden=false;
       $this->Lhid7->Value = $row['id'];
       $this->imgR7->Hidden=false;
       }
       if($row['t_type']=='R7')
       {
       if($row['is_assigned'] == 'yes')
       {
       $this->trid7->Value = $row['tire_id'];
       $this->Risblank7->Value = '1';
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgR7->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snrid7->Value = $rower['tire_SN'];
       }
       $this->imgR7->ImageSource = 'image/new_tire.png';
       }
       $this->Rhid7->Value = $row['id'];
       }
       if($row['t_type']=='L9')
       {
       if($row['is_assigned'] == 'yes')
       {
       $this->tid9->Value = $row['tire_id'];
       $this->Lisblank9->Value = '1';
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgL9->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snid9->Value = $rower['tire_SN'];
       }
       $this->imgL9->ImageSource = 'image/new_tire.png';
       }
       $this->imgBar5->Hidden=false;
       $this->imgL9->Hidden=false;
       $this->Lhid9->Value = $row['id'];
       $this->imgR9->Hidden=false;
       }
       if($row['t_type']=='R9')
       {
       if($row['is_assigned'] == 'yes')
       {
       $this->trid9->Value = $row['tire_id'];
       $this->Risblank9->Value = '1';
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgR9->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snrid9->Value = $rower['tire_SN'];
       }
       $this->imgR9->ImageSource = 'image/new_tire.png';
       }
       $this->Rhid9->Value = $row['id'];
       }
       if($row['t_type']=='L11')
       {
       if($row['is_assigned'] == 'yes')
       {
       $this->tid11->Value = $row['tire_id'];
       $this->Lisblank11->Value = '1';
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgL11->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snid11->Value = $rower['tire_SN'];
       }
       $this->imgL11->ImageSource = 'image/new_tire.png';
       }
       $this->imgBar6->Hidden=false;
       $this->imgL11->Hidden=false;
       $this->Lhid11->Value = $row['id'];
       $this->imgR11->Hidden=false;
       }
       if($row['t_type']=='R11')
       {
       if($row['is_assigned'] == 'yes')
       {
       $this->trid11->Value = $row['tire_id'];
       $this->Risblank11->Value = '1';
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgR11->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snrid11->Value = $rower['tire_SN'];
       }
       $this->imgR11->ImageSource = 'image/new_tire.png';
       }
       $this->Rhid11->Value = $row['id'];
       }
       if($row['t_type']=='L2')
       {
       if($row['is_assigned'] == 'yes')
       {
       $this->tid2->Value = $row['tire_id'];
       $this->Lisblank2->Value = '1';
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgL2->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snid2->Value = $rower['tire_SN'];
       }
       $this->imgL2->ImageSource = 'image/new_tire.png';
       }
       $this->imgBar1->Hidden=false;
       $this->imgL2->Hidden=false;
       $this->Lhid2->Value = $row['id'];
       $this->imgR2->Hidden=false;
       }
       if($row['t_type']=='R2')
       {
       if($row['is_assigned'] == 'yes')
       {
       $this->trid2->Value = $row['tire_id'];
       $this->Risblank2->Value = '1';
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgR2->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snrid2->Value = $rower['tire_SN'];
       }
       $this->imgR2->ImageSource = 'image/new_tire.png';
       }
       $this->Rhid2->Value = $row['id'];
       }
       if($row['t_type']=='L4')
       {
       if($row['is_assigned'] == 'yes')
       {
       $this->tid4->Value = $row['tire_id'];
       $this->Lisblank4->Value = '1';
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgL4->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snid4->Value = $rower['tire_SN'];
       }
       $this->imgL4->ImageSource = 'image/new_tire.png';
       }
       $this->imgBar2->Hidden=false;
       $this->imgL4->Hidden=false;
       $this->Lhid4->Value = $row['id'];
       $this->imgR4->Hidden=false;
       }
       if($row['t_type']=='R4')
       {
       if($row['is_assigned'] == 'yes')
       {
       $this->trid4->Value = $row['tire_id'];
       $this->Risblank4->Value = '1';
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgR4->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snrid4->Value = $rower['tire_SN'];
       }
       $this->imgR4->ImageSource = 'image/new_tire.png';
       }
       $this->Rhid4->Value = $row['id'];
       }
       if($row['t_type']=='L6')
       {
       if($row['is_assigned'] == 'yes')
       {
       $this->tid6->Value = $row['tire_id'];
       $this->Lisblank6->Value = '1';
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgL6->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snid6->Value = $rower['tire_SN'];
       }
       $this->imgL6->ImageSource = 'image/new_tire.png';
       }
       $this->imgBar3->Hidden=false;
       $this->imgL6->Hidden=false;
       $this->Lhid6->Value = $row['id'];
       $this->imgR6->Hidden=false;
       }
       if($row['t_type']=='R6')
       {
       if($row['is_assigned'] == 'yes')
       {
       $this->trid6->Value = $row['tire_id'];
       $this->Risblank6->Value = '1';
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgR6->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snrid6->Value = $rower['tire_SN'];
       }
       $this->imgR6->ImageSource = 'image/new_tire.png';
       }
       $this->Rhid6->Value = $row['id'];
       }
       if($row['t_type']=='L8')
       {
       if($row['is_assigned'] == 'yes')
       {
       $this->tid8->Value = $row['tire_id'];
       $this->Lisblank8->Value = '1';
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgL8->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snid8->Value = $rower['tire_SN'];
       }
       $this->imgL8->ImageSource = 'image/new_tire.png';
       }
       $this->imgBar4->Hidden=false;
       $this->imgL8->Hidden=false;
       $this->Lhid8->Value = $row['id'];
       $this->imgR8->Hidden=false;
       }
       if($row['t_type']=='R8')
       {
       if($row['is_assigned'] == 'yes')
       {
       $this->trid8->Value = $row['tire_id'];
       $this->Risblank8->Value = '1';
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgR8->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snrid8->Value = $rower['tire_SN'];
       }
       $this->imgR8->ImageSource = 'image/new_tire.png';
       }
       $this->Rhid8->Value = $row['id'];
       }
       if($row['t_type']=='L10')
       {
       if($row['is_assigned'] == 'yes')
       {
       $this->tid10->Value = $row['tire_id'];
       $this->Lisblank10->Value = '1';
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgL10->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snid10->Value = $rower['tire_SN'];
       }
       $this->imgL10->ImageSource = 'image/new_tire.png';
       }
       $this->imgBar5->Hidden=false;
       $this->imgL10->Hidden=false;
       $this->Lhid10->Value = $row['id'];
       $this->imgR10->Hidden=false;
       }
       if($row['t_type']=='R10')
       {
       if($row['is_assigned'] == 'yes')
       {
       $this->trid10->Value = $row['tire_id'];
       $this->Risblank10->Value = '1';
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgR10->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snrid10->Value = $rower['tire_SN'];
       }
       $this->imgR10->ImageSource = 'image/new_tire.png';
       }
       $this->Rhid10->Value = $row['id'];
       }
       if($row['t_type']=='L12')
       {
       if($row['is_assigned'] == 'yes')
       {
       $this->tid12->Value = $row['tire_id'];
       $this->Lisblank12->Value = '1';
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgL12->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snid12->Value = $rower['tire_SN'];
       }
       $this->imgL12->ImageSource = 'image/new_tire.png';
       }
       $this->imgBar6->Hidden=false;
       $this->imgL12->Hidden=false;
       $this->Lhid12->Value = $row['id'];
       $this->imgR12->Hidden=false;
       }
       if($row['t_type']=='R12')
       {
       $this->trid12->Value = $row['tire_id'];
       if($row['is_assigned'] == 'yes')
       {
       $this->Risblank12->Value = '1';
       $queryer = mysql_query("select * from tire_inventory_tbl where tire_id='".$row['tire_id']."'");
       while($rower = mysql_fetch_array($queryer))
       {
       $this->imgR12->Hint = "Tire ID/SN: ".$rower['tire_SN']." is Located Here";
       $this->snrid12->Value = $rower['tire_SN'];
       }
       $this->imgR12->ImageSource = 'image/new_tire.png';
       }
       $this->Rhid12->Value = $row['id'];
       }

       $result_vin = mysql_query("select * from vehicle_tbl where company_id='".$_SESSION['company_id']."' AND vehicle_id ='".$this->hiddenId->getValue()."'") or die('SELECT VIN'.mysql_error());
       $row_vin = mysql_fetch_array($result_vin);
       $this->lblVIN->Caption=$row_vin['VIN'];

       }

       }


}

global $application;

global $Mount_Dismount;

//Creates the form
$Mount_Dismount=new Mount_Dismount($application);

//Read from resource file
$Mount_Dismount->loadResource(__FILE__);

//Shows the form
$Mount_Dismount->show();

?>